<%@ page contentType="text/html;charset=UTF-8" language="java" %>

                <html>
                <head>
                    <title>Title</title>
                    <link type="text/css" href="/static/layui/css/layui.css" rel="stylesheet"/>
                    <script type="text/javascript" src="/static/js/jquery-3.4.1.min.js"></script>
                </head>
                <body>

                <table class="layui-hide" id="resource" lay-filter="resource"></table>
                <script src="//res.layui.com/layui/dist/layui.js" charset="utf-8"></script>



                <script type="text/html" id="barDemo">
                    <a class="layui-btn layui-btn-xs" lay-event="edit">修改</a>
                    <a class="layui-btn layui-btn-xs" lay-event="Singledel">删除</a>
                </script>
                <script type="text/html" id="btnDemo">
                    <a class="layui-btn layui-btn-xs" lay-event="add">添加</a>
                    <a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="del">删除</a>
                </script>

                <script>
                    var tobleReload;
                    layui.use(['table','layer'], function(){
                        var table = layui.table;
                        var layer=layui.layer;

                        tobleReload=table.render({
                            elem: '#resource'
                            ,url:'/addr/all'
                            ,toolbar: '#btnDemo' //开启头部工具栏，并为其绑定左侧模板
                            ,defaultToolbar: ['filter', 'exports', 'print', { //自定义头部工具栏右侧图标。如无需自定义，去除该参数即可
                                title: '提示'
                                ,layEvent: 'LAYTABLE_TIPS'
                                ,icon: 'layui-icon-tips'
                            }]
                            ,title: '用户数据表'
                            ,cols: [[
                                {checkbox: true, fixed: true}
                               , {field: 'aid', title: '地址id', width: 80}
                                , {field: 'uid', title: '用户id', width: 120}
                                , {field: 'name', title: '用户名称', width: 120}
                                , {field: 'tel', title: '用户电话', width: 120}
                                , {field: 'areacode', title: '地址编码', width: 120}
                                ,{field: 'shengshi', title: '省份', width: 120}
                                ,{field: 'city', title: '城市', width: 120}
                                ,{field: 'quxian', title: '所在区', width: 120}
                                ,{field: 'addrInfo', title: '详细住址', width: 120}
                            ]]
                            ,page: {limits: [5, 10, 15, 20, 25]}
                        });

                    });
                </script>

                </body>
                </html>